﻿using Acme.BookStore.Ball;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Acme.BookStore.BallDto
{
    public class CreateUpdateBallDto
    {
        [Required(ErrorMessage = "名称必填")]
        [StringLength(100,MinimumLength = 1, ErrorMessage = "名称长度必须在1-100之间")]
        public string Name { get; set; }

        [Required(ErrorMessage = "类型必选")]
        public BallType Type { get; set; }

        [Required(ErrorMessage ="价格必填")]
        [Range(0.01,9999999.99)]
        public decimal Price { get; set; }

        [Required(ErrorMessage = "品牌必选")]
        public BallBrand Brand { get; set; }
        public string Hobby { get; set; }
    }
}
